﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
	public class SeatInfoConfig : IEntityTypeConfiguration<SeatInfo>
	{
		public void Configure(EntityTypeBuilder<SeatInfo> builder)
		{
			builder.ToTable("T_Seat");
			builder.Property(s => s.SeatNumber).HasMaxLength(10).IsRequired();
			builder.Property(s => s.StudentID);
			builder.Property(s => s.ClassID);
			builder.Property(s => s.IsOccupied).HasDefaultValue(false).IsRequired();
			builder.Property(s => s.IsUse).HasDefaultValue(false).IsRequired();

			
		}
	}
}
